// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_pr.p_activity;

import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.Html;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.nnee.p_fk.cls_ActivityEx;
import com.nnee.p_g.cls_b;
import com.nnee.p_img.cls_c;
import com.nnee.p_l.p_a.cls_a;
import com.nnee.p_pr.p_a.cls_f;
import com.nnee.p_pr.p_app.cls_PrisApp;
import com.nnee.p_pr.p_offline.cls_ProcessResult;
import com.nnee.p_pr.p_offline.cls_e;

// Referenced classes of package com.nnee.p_pr.p_activity:
//            bl, bj, PRISActivityFlasScreen

public class cls_PRISActivityOffline extends cls_ActivityEx
    implements cls_e
{

    public cls_PRISActivityOffline()
    {
        G = 1;
        J = new cls_bl(this);
    }

    private void a(int i)
    {
        G = i;
       switch( i)
       {
       case 0:
       case 2:
    	   
       case 3:
    	  
       case 4:
    	  
       case 5:
    	   
       case 6:
    	   if(A != null)
               A.setVisibility(8);
           if(B != null)
               B.setVisibility(0);
    	   break;
       case 1:
    	   if(A != null)
               A.setVisibility(0);
           if(B != null)
               B.setVisibility(8);
    	   break;
       default:
    	   break;
       }
      
    }

    private void b(int i, Object obj)
    {
        if(obj != null)
        {
            Message message = Message.obtain(J);
            message.what = i;
            message.obj = obj;
            G = i;
            J.sendMessage(message);
        }
    }

    private void e()
    {
        J.removeMessages(2);
        J.removeMessages(5);
        J.removeMessages(3);
        J.removeMessages(4);
        J.removeMessages(1);
        J.removeMessages(7);
        J.removeMessages(0);
        J.removeMessages(6);
    }

    public int a(int i, Object obj)
    {
        if(obj != null)
            b(i, obj);
        return 0;
    }

    protected void a(int i, Message message)
    {cls_ProcessResult processresult =null;
        int j;
        j = 0x7f0a014d;
        com.nnee.p_g.cls_b.c("Prisactivityoffline", (new StringBuilder()).append("status: ").append(message.what).toString());
        a(message.what);
        if(message.obj != null) {
        	  processresult = (cls_ProcessResult)message.obj;
            switch(i){
            case 3:
            	j = 0x7f0a014e;
            	break;
            case 5:
            	j = 0x7f0a020f;
            	break;
            case 6:
            	j = 0x7f0a014f;
            	break;
            case 4:
            	default:
            	break;
            }
            
            C.setImageResource(0x7f0200ca);
            D.setText(0x7f0a014b);
            TextView textview = E;
            Object aobj[] = new Object[3];
            aobj[0] = getString(j);
            aobj[1] = Integer.valueOf(processresult.d());
            aobj[2] = com.nnee.p_pr.p_a.cls_f.a(this, processresult.g());
            textview.setText(getString(0x7f0a014c, aobj));
            F.setText(0x7f0a0150);
        }
        
        
        
 
    }

    protected void a(Message message)
    {
        cls_ProcessResult processresult = (cls_ProcessResult)message.obj;
        if(processresult != null)
        {
            if(!TextUtils.isEmpty(processresult.i()))
                c.setText(processresult.i());
            y.setMax(processresult.b());
            y.setProgress(processresult.a());
            g.setText(com.nnee.p_pr.p_a.cls_f.a(this, processresult.g()));
            v.setText(com.nnee.p_l.p_a.cls_a.a(processresult.h()));
            x.setText(processresult.c());
            TextView textview = e;
            Object aobj[] = new Object[1];
            aobj[0] = Integer.valueOf(processresult.j() / 1024);
            textview.setText(getString(0x7f0a0151, aobj));
            TextView textview1 = H;
            Object aobj1[] = new Object[2];
            aobj1[0] = Integer.valueOf(processresult.f());
            aobj1[1] = Integer.valueOf(processresult.e());
            textview1.setText(Html.fromHtml(String.format("<font color=\"#FFFFFF\">%d</font>/<font color=\"#999999\">%d</font> ", aobj1)));
            F.setText(0x7f0a0152);
        }
    }

    void b()
    {
        setTitle(0x7f0a0144);
        g(8);
        H = (TextView)findViewById(0x7f0d0009);
        H.setVisibility(0);
        H.setTextSize(com.nnee.p_img.cls_c.a(this, 14F));
        H.setTextColor(Color.rgb(153, 153, 153));
        F = (Button)findViewById(0x7f0d00aa);
        View view;
        View view1;
        View view2;
        View view3;
        Intent intent;
        cls_ProcessResult processresult;
        if(cls_PrisApp.a().y())
        {
            F.setText(0x7f0a0152);
            G = 1;
        } else
        {
            F.setText(0x7f0a0145);
        }
        F.setOnClickListener(new cls_bj(this));
        A = (ViewGroup)findViewById(0x7f0d00a8);
        view = A.findViewById(0x7f0d00b2);
        view1 = A.findViewById(0x7f0d00b5);
        view2 = A.findViewById(0x7f0d00b6);
        view3 = A.findViewById(0x7f0d00b7);
        d = (TextView)view.findViewById(0x7f0d00b0);
        d.setText(0x7f0a0146);
        c = (TextView)view.findViewById(0x7f0d00b1);
        f = (TextView)view1.findViewById(0x7f0d00b0);
        f.setText(0x7f0a0147);
        e = (TextView)view1.findViewById(0x7f0d00b1);
        f.setVisibility(8);
        e.setVisibility(8);
        u = (TextView)view2.findViewById(0x7f0d00b0);
        u.setText(0x7f0a0148);
        g = (TextView)view2.findViewById(0x7f0d00b1);
        w = (TextView)view3.findViewById(0x7f0d00b0);
        w.setText(0x7f0a0149);
        v = (TextView)view3.findViewById(0x7f0d00b1);
        x = (TextView)findViewById(0x7f0d00b4);
        x.setTextColor(Color.rgb(255, 255, 255));
        y = (ProgressBar)findViewById(0x7f0d00b3);
        z = (TextView)findViewById(0x7f0d00b8);
        z.setText(0x7f0a014a);
        B = (ViewGroup)findViewById(0x7f0d00a9);
        C = (ImageView)B.findViewById(0x7f0d00ad);
        D = (TextView)B.findViewById(0x7f0d00ae);
        E = (TextView)B.findViewById(0x7f0d00af);
        intent = getIntent();
        processresult = (cls_ProcessResult)intent.getParcelableExtra("extra_result");
        G = intent.getIntExtra("extra_status", 7);
        b(G, processresult);
        cls_PrisApp.a().a(this);
    }

    protected void b(Message message)
    {
        a(message.what);
        if(message.obj != null)
        {
            cls_ProcessResult processresult = (cls_ProcessResult)message.obj;
            C.setImageResource(0x7f0200cb);
            D.setText(0x7f0a0153);
            TextView textview = E;
            Object aobj[] = new Object[2];
            aobj[0] = Integer.valueOf(processresult.d());
            aobj[1] = com.nnee.p_pr.p_a.cls_f.a(this, processresult.g());
            textview.setText(getString(0x7f0a0154, aobj));
            F.setText(0x7f0a0145);
            TextView textview1 = H;
            Object aobj1[] = new Object[2];
            aobj1[0] = Integer.valueOf(processresult.f());
            aobj1[1] = Integer.valueOf(processresult.e());
            textview1.setText(Html.fromHtml(String.format("<font color=\"#FFFFFF\">%d</font>/<font color=\"#999999\">%d</font> ", aobj1)));
        }
    }

    protected void c()
    {
        cls_PrisApp.a().u();
        com.nnee.p_pr.p_offline.cls_b.a().b();
        if(G == 7)
        {
            Intent intent = new Intent(this, com.nnee.p_pr.p_activity.cls_PRISActivityFlasScreen.class);
            intent.setAction("android.intent.action.MAIN");
            intent.addCategory("android.intent.category.LAUNCHER");
            startActivity(intent);
        }
        finish();
    }

    protected void c(Message message)
    {
        a(message.what);
        if(message.obj != null)
        {
            cls_ProcessResult processresult = (cls_ProcessResult)message.obj;
            C.setImageResource(0x7f0200ca);
            D.setText(0x7f0a014b);
            TextView textview = E;
            Object aobj[] = new Object[2];
            aobj[0] = Integer.valueOf(processresult.d());
            aobj[1] = com.nnee.p_pr.p_a.cls_f.a(this, processresult.g());
            textview.setText(getString(0x7f0a014c, aobj));
            F.setText(0x7f0a0150);
        }
    }

    protected void onCreate(Bundle bundle)
    {
        super.onCreate(bundle);
        setContentView(0x7f030034);
        b();
        a(1);
    }

    protected void onDestroy()
    {
        cls_PrisApp.a().b(this);
        e();
        super.onDestroy();
    }

    private static final String I = "<font color=\"#FFFFFF\">%d</font>/<font color=\"#999999\">%d</font> ";
    private static final String a = com.nnee.p_pr.p_activity.cls_PRISActivityOffline.class.getSimpleName();
    private static final boolean b=false;
    private ViewGroup A;
    private ViewGroup B;
    private ImageView C;
    private TextView D;
    private TextView E;
    private Button F;
    private int G;
    private TextView H;
    private Handler J;
    private TextView c;
    private TextView d;
    private TextView e;
    private TextView f;
    private TextView g;
    private TextView u;
    private TextView v;
    private TextView w;
    private TextView x;
    private ProgressBar y;
    private TextView z;

}
